Security Improvements in a Wireless Data Exchange Protocol

ABSTRACT

A security solution for Bluetooth Low Energy (BLE) or equivalent wireless data exchange protocols involves authentication of a peripheral device by a central device using the advertising channel is presented. A method of authenticating a peripheral device in a wireless data exchange has a peripheral device sending an advertising channel Protocol Data Unit (PDU), a central device receiving the advertising channel PDU and the central device sending a scan request scanning PDU to the peripheral device. The advantage of this method of using discovery protocol enables a software based solution for the monitoring device and a hardware with software based solution on the beacon device.

TECHNICAL FIELD

The present disclosure relates to security improvements in a wireless data exchange protocol, and in particular to authentication of peripheral devices.

BACKGROUND

One popular protocol for wireless data exchange is known as Bluetooth. In particular, the Bluetooth Low Energy (BLE) standard, also referred to as Bluetooth Smart, provides a specification for the wireless exchange of data between fixed and/or mobile devices. Its operation is defined by various standards and specifications which are managed by the Bluetooth Special Interest Group.

However, existing security solutions for BLE and other wireless protocols rely on devices being connected with each other. There are no ways for non-connected devices to avoid attacks such as replay, relay or man-in-the-middle attacks.

SUMMARY

According to a first aspect of the disclosure there is provided a method of authenticating a peripheral device in a wireless data exchange protocol, wherein: the peripheral device sends an advertising channel Protocol Data Unit (PDU) comprising a first nonce; a central device receives the advertising channel PDU and said first nonce and sends a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; the peripheral device performs an encryption function using said first and second nonces to obtain a first result and sends a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result; the central device performs an encryption function on said first and second nonces to obtain a second result and authenticates the peripheral device if said first and second results match.

Optionally, the first and second nonces comprise random numbers.

Optionally, the central device and peripheral device are both provisioned with a key for performing the encryption function.

Optionally, the key is a 64-bit random number.

Optionally, the wireless data exchange protocol is a Bluetooth Low Energy protocol.

Optionally, the first nonce comprises a 64-bit, 128-bit or 256-bit random number and the second nonce comprises a 48-bit random number.

Optionally, said advertising channel PDU comprises a connectable undirected advertising event PDU or a scannable undirected advertising event PDU.

Optionally, the time between the scan request scanning PDU and the scan response scanning PDU is 150 μs or less.

According to a second aspect of the disclosure there is provided a system for wireless data exchange comprising a peripheral device and a central device arranged to authenticate a peripheral device wherein: the peripheral device is arranged to send an advertising channel PDU comprising a first nonce; a central device is arranged to receive the advertising channel PDU and said first nonce and sends a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; the peripheral device is arranged to perform an encryption function using said first and second nonces to obtain a first result and sends a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result; and the central device is arranged to perform an encryption function on said first and second nonces to obtain a second result and to authenticate the peripheral device if said first and second results match.

According to a third aspect of the disclosure there is provided a method of authenticating a peripheral device in a wireless data exchange protocol, wherein the peripheral device: sends an advertising channel PDU comprising a first nonce; receives a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; and performs an encryption function using said first and second nonces to obtain a first result and sends a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result.

According to a fourth aspect of the disclosure there is provided a peripheral device for use with a wireless data exchange protocol and being arranged to: send an advertising channel PDU comprising a first nonce; receive a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; and perform an encryption function using said first and second nonces to obtain a first result; and to send a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result.

According to a fifth aspect of the disclosure there is provided a method of authenticating a peripheral device in a wireless data exchange protocol, wherein a central device: receives an advertising channel PDU from the peripheral device, said advertising channel PDU comprising a first nonce; sends a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; receives a scan response scanning PDU from the peripheral device, said scan response scanning PDU comprising a first result being derived from an encryption function using said first and second nonces; performs an encryption function on said first and second nonces to obtain a second result; and authenticates the peripheral device if said first and second results match.

According to a sixth aspect of the disclosure there is provided a central device for use with a wireless data exchange protocol and being arranged to: receive an advertising channel PDU from the peripheral device, said advertising channel PDU comprising a first nonce; send a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; receive a scan response scanning PDU from the peripheral device, said scan response scanning PDU comprising a first result being derived from an encryption function using said first and second nonces; perform an encryption function on said first and second nonces to obtain a second result; and authenticate the peripheral device if said first and second results match.

According to a seventh aspect of the disclosure there is provided cryptographic authentication of a peripheral device using a wireless search and discovery protocol.

BRIEF DESCRIPTION OF THE DRAWINGS

The disclosure will be described below, by way of example only, with reference to the accompanying drawings, in which:

FIG. 1 shows a BLE link layer data format;

FIG. 2 shows an advertising channel PDU format;

FIG. 3 shows the format of a header field of an advertising channel PDU;

FIG. 4 illustrates the exchange of advertising channel PDUs;

FIGS. 5 and 6 illustrate the exchange of advertising channel PDUs according to an embodiment of the disclosure; and

FIG. 7 illustrates the timing of the exchange of advertising channel PDUs in the process illustrated in FIGS. 5 and 6.

DESCRIPTION

BLE is defined in various standards documents, including for example the “Specification of the Bluetooth System”, Covered Core Package version 4.2, Volumes 1-7, which are hereby incorporated by reference. BLE defines two types of devices. A peripheral device is assumed to be a low-power device that exposes state or information, and a central device is a powered device with a relatively greater processing capability. Mobile devices such as smart phones or tablet computers may act as central devices if they are equipped with the appropriate hardware and software.

BLE peripherals enter an advertising mode when they are turned on. Central devices can receive the advertising protocol data units (PDUs) when they are in a scanning state.

The BLE standard uses the unlicensed 2.4 GHz spectrum. The spectrum is divided into thirty-nine 2.0 MHz-wide channels. Three channels are reserved for advertising and the remainder are reserved for data.

The BLE link layer defines a single packet format for both advertising and data channel packets. As shown in FIG. 1, this format specifies a preamble, an access address, a protocol data unit (PDU), and a cyclic redundancy check (CRC). The preamble is transmitted first, followed by the access address, then the PDU then the CRC.

The PDU may take various different formats. Specific advertising channel PDUs and data channel PDUs are defined depending on whether the packet is transmitted in an advertising physical channel or a data physical channel.

The advertising channel PDU has a 16-bit header and a variable size payload, as shown in FIG. 2. The 16-bit header field of the advertising channel PDU is shown in FIG. 3.

There are various types of PDU, and the type is specified by the PDU Type field. The TxAdd and RxAdd fields contain information specific to each PDU type, and the length indicates the payload field length. There are two fields which are reserved for future use (RFU).

The advertising channel PDU types include the following, which are called advertising PDUs and are used in the specified events:

-   -   ADV_IND: connectable undirected advertising event     -   ADV_DIRECT_IND: connectable directed advertising event     -   ADV_NONCONN_IND: non-connectable undirected advertising event     -   ADV_SCAN_IND: scannable undirected advertising event

A non-connectable event is one in which the transmission is one-way. The peripheral transmits a string of data but will not respond to any request and cannot make a connection. A connectable event is one in which the peripheral can exchange information with a central device. An undirected advertising event is broadcast and can be received by any listening central device. A directed advertising event is one which is targeted at a particular central device.

Each of the ADV_IND, ADV_SCAN_IND and ADV_NONCONN_IND PDUs has a payload with an AdvA field containing the advertiser's address and an AdvData field containing advertising data from the advertiser's host. The advertiser's address is either public or random as indicated by TxAdd. The AdvA field may contain advertising data from the advertiser's host.

The ADV_DIRECT_IND PDU has a payload with an AdvA field containing the advertiser's address and an InitA field specifying the address of the device to which the PDU is addressed. The advertiser's address is either public or random as indicated by TxAdd, and the initiator's address is either public or random as indicated by RxAdd. This packet does not contain any host data.

The advertising channel PDU types include the following, which are called scanning PDUs and are used in the following states:

-   -   SCAN_REQ: sent by the link layer in the scanning state, received         by a link layer in the advertising state.     -   SCAN_RESPONSE (also referred to as SCAN_RSP): sent by the link         layer in the advertising state, received by a link layer in the         scanning state.

The SCAN_REQ PDU has a payload which comprises a ScanA field containing the scanner's address which is public or random as indicate by TxAdd, and an AdvA field containing the address of the device to which this PDU is directed which is public or random as indicated by RxAdd. This packet does not contain any host data.

The SCAN_RESPONSE PDU has a payload which comprises an AdvA field containing the advertiser's address which is public or random as indicate by TxAdd, and a ScanRspData which may contain any data from the advertiser's host.

An initiating advertising channel PDU, CONNECT_REQ, is also provided. This is sent by the link layer in an initiating state and received by the link layer in the advertising state.

FIG. 4 illustrates the exchange of advertising channel PDUs. A peripheral device 400 sends an advertisement PDU, for example, ADV_IND. A central device 402 responds with a scan request SCAN_REQ. Once this is received by the peripheral device 400, it sends a scan response advertising channel PDU SCAN_RESPONSE with data for use by the central device.

The present disclosure involves making use of this discovery procedure to implement a new security solution. This means that even non-connected devices can be protected from replay attacks, whereby a valid data transmission is maliciously or fraudulently repeated or delayed.

An embodiment of the disclosure is illustrated in FIG. 5, which shows an example implementation in BLE. Here, a peripheral device 500 (P) and a central device 502 (C) exchange advertising channel PDUs in a similar fashion to the process set out in FIG. 4. However, according to the discovery process as implemented in FIG. 5, the peripheral device 500 and the central device 502 are provisioned with a shared secret key (K). This may be done by a specific application on a phone or a computer.

The peripheral device 500 transmits an advertising PDU 504 and includes as part of the payload a first nonce which comprises a random number Pn. This random number Pn is preferably different in every packet that is broadcast. It will be appreciated that the disclosure is not limited to any particular size of random number. If the central device 502 is in a scanning state it receives an advertising PDU 504 and then generates a second nonce which comprises a second random number Cn.

The central device 502 then sends a scanning PDU 506 which includes as part of its payload the second random number Cn. The peripheral device 500 then encrypts the two random numbers Pn and Cn with the key K, obtaining a result Res1. The peripheral device 500 then sends a scanning PDU 508 back to the peripheral device 502 which includes the result Res1 of the encryption, together with the other data that is associated with a host of the peripheral device 500.

The central device 502 also encrypts then decrypts the two random numbers Pn and Cn with the key K, obtaining a result Res2. It then makes a check to see if Res1 and Res2 match, and the data that it receives is verified only if there is a match. If the data is not verified, the central device 502 may discard it. The peripheral 500 may also be blacklisted, that is, its identity may be stored so that any interactions with that same peripheral device 500 in the future are ignored.

The verification means that the central device 502 can be sure that the peripheral 500 it is interacting with is a legitimate device and not an imposter device and thus provides a defense against replay attacks.

Further aspects of the process are also illustrated in FIG. 6. At step 600, a peripheral (such as a beacon) periodically broadcasts an advertising packet with a nonce. The nonce is different in every packet.

At step 602, a central device (which can also generally be called a monitoring device) receives a broadcasted packet and receives the nonce. Immediately after receiving the broadcasted packet the monitoring device transmits a scan request PDU (SCAN_REQ) with a second nonce.

At step 604, the peripheral receives the SCAN_REQ packet and the second nonce. The peripheral then calculates (in less than 150 uS) the function AES (Key, nonce1, nonce2) where K is the Key already stored in the peripheral. The result of the calculation called RES1 which is then transmitted back to the monitoring device in a scan response PDU (SCAN_RSP), along with other application data APP_DATA.

At step 606, the monitoring device receives the scan response PDU and the value RES1 as well as APP_DATA. The monitoring device then compares RES1 with its own calculation result of AES (K, Tn, Mn). If the results of the comparison are equal then the monitoring device makes use of the APP_DATA and if the comparison are not equal the monitoring device discards the APP_DATA and black lists the beacon.

The peripheral and the central device both use the same encryption function. Any suitable cryptography algorithm can be used. Any one-way hash function can be used. One possible technique is the Advanced Encryption Standard (AES). Hardware or firmware for performing this encryption method or others can be integrated together with the relevant hardware, firmware and software for implementing the BLE or other wireless data exchange.

While a symmetric key implementation has been illustrated, the disclosure can also support cryptographic algorithms which employ asymmetric keys. In those embodiments which employ asymmetric keys, the peripheral device 500 and central device 502 of FIG. 5 could exchange a public key and use private keys to encrypt and decrypt the random numbers which are generated.

The disclosure is not limited to any specific format for the first and second random numbers Pn, Cn and the symmetric key K, but for purposes of illustration, a suitable specification of these numbers for the purposes of a BLE implementation may be as follows:

The first random number Pn transmitted in the advertising PDU 504 could satisfy one, more or all of the following requirements:

-   -   The random number shall have no more than twelve consecutive         zeros or ones     -   The random number shall not be a sequence that differs from the         previous random number by only one bit     -   The random number shall not have all eight octets equal     -   The random number shall have no more than 48 transitions     -   The random number shall have a minimum of four transitions in         the most significant twelve bits

The key K shared by the peripheral device 500 and the central device 502 could satisfy one, more or all of the following requirements:

-   -   The Key shall have no more than twelve consecutive zeros or ones     -   The Key shall not have all eight octets equal     -   The Key shall have no more than 48 transitions     -   The Key shall have a minimum of four transitions in the most         significant twelve bits     -   The second random number Cn transmitted in the response scanning         PDU 508 could for example be a 48-bit random number. This size         is compatible with BLE specifications, for example version 4.0         specifies a SCAN_REQ packet with the first 48 bits being the         central device's address and the following 48 bits as being the         peripheral's address. The number Cn could satisfy one, more or         all of the following requirements:     -   The random number shall have no more than nine consecutive zeros         or ones     -   The random number shall not be a sequence that differs from the         previous random number by only one bit     -   The random number shall not have all six octets equal     -   The random number shall have no more than 36 transitions     -   The random number shall have a minimum of four transitions in         the most significant nine bits

As shown in FIG. 7, the Bluetooth specification requires the transmission of a scan response PDU within a set time limit from the transmission of a scan request. In the case of Bluetooth 4.0, the required time is 150 μs.

The present disclosure makes the necessary calculations (of Res1, Res2) within this time period, and indeed within 1 ms. The time taken to perform the calculations depends on the choice of the random numbers Pn, Cn and the key K, as well as the speed of the hardware, firmware and software that is used for carrying out the calculations. The above specific example illustrates exemplary choices of Pn, Cn and K that will enable rapid calculation with most available device implementations.

Complying with this time limit helps guard against relay attacks (where communication with both sides is initiated by an attacker who relays messages between the two sides) and against man-in-the-middle attacks (where an attacker intercepts and manipulates communications between two parties which are initiated by one of the parties), because both of these attacks require time from an adversary in order to be implemented.

The embodiment of FIG. 5 is illustrated with a connectable undirected advertising event PDU, ADV_IND. However, the disclosure may also function with a scannable undirected advertising event ADV_SCAN_IND.

Also there are various PDU types defined by an advertising PDU header which are reserved, and the disclosure may make use of these reserved types.

The peripheral device may in a preferred embodiment be a beacon, for example an iBeacon® as provided by Apple Computer Inc.

Consider a use case where a Beacon (B) is attached to an asset (e.g. blood measuring equipment in a hospital). An asset manager can monitor on a monitoring device (e.g. a mobile phone) the position of the asset by receiving the broadcast data from the beacon. The asset manager needs to be confident that the data received is from a valid and authorized beacon and not from a hacking device (performing a replay attack). The present disclosure explains how security in the beacon can be implemented.

Consider that the beacons are provisioned with a secret key K before they are attached to assets in a hospital. The provisioning of beacons can be done by a specific application on a mobile phone or on another computer. The key should be randomly generated by the provisioning master. It is also possible to provision additional auxiliary masters using a similar mechanism to the original provisioning process, so that multiple authorized monitoring devices can be provided with the security functions of the disclosure for a given set of beacons which share the same key.

When the beacons are attached to assets, the beacons periodically broadcast a set of known data (e.g. Asset ID, Co-ordinates of the position of the beacon, etc). A monitoring device (M) (e.g. a mobile phone or a gateway) with a specific application can be used to receive data from all the beacons. The application may periodically receive data from the beacons. The device M checks the security of each beacon to check that the beacon is a legitimate device and not a hacking device. By checking the security of each beacon, the monitoring device ensures that the information received from the beacon is reliable and secure.

The additional advantages of the invention include the following:

-   -   1. Using the discovery protocol enables a software based         solution for the monitoring device and a hardware with software         based solution on the beacon device. A beacon with suitable         hardware may only require software changes to support the         security solution.     -   2. The new data set for the security solution used in the         discovery protocol is simple and easier to support.     -   3. The security solution can support one monitoring device to         many beacons because it is fast (less than 1 milisecond).     -   4. The security solution is a much lower power solution than a         connection based security solution.

Various modifications and improvements can be made to the above without departing from the scope of the disclosure. 

What is claimed is:
 1. A method of authenticating a peripheral device in a wireless data exchange protocol, wherein: the peripheral device sends an advertising channel PDU comprising a first nonce; a central device receives the advertising channel PDU and said first nonce and sends a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; the peripheral device performs an encryption function using said first and second nonces to obtain a first result and sends a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result; the central device performs an encryption function on said first and second nonces to obtain a second result and authenticates the peripheral device if said first and second results match.
 2. The method of claim 1, wherein the first and second nonces comprise random numbers.
 3. The method of claim 1, wherein the central device and peripheral device are both provisioned with a key for performing the encryption function.
 4. The method of claim 3, wherein the key is a 64-bit random number.
 5. The method of claim 1, wherein the wireless data exchange protocol is a Bluetooth Low Energy protocol.
 6. The method of claim 5, wherein the first nonce comprises a 64-bit, 128-bit or 256-bit random number and the second nonce comprises a 48-bit random number.
 7. The method of claim 5, wherein said advertising channel PDU comprises a connectable undirected advertising event PDU or a scannable undirected advertising event PDU.
 8. The method of claim 1, wherein the time between the scan request scanning PDU and the scan response scanning PDU is 150 μs or less.
 9. A system for wireless data exchange comprising a peripheral device and a central device arranged to authenticate a peripheral device wherein: the peripheral device is arranged to send an advertising channel PDU comprising a first nonce; a central device is arranged to receive the advertising channel PDU and said first nonce and sends a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; the peripheral device is arranged to perform an encryption function using said first and second nonces to obtain a first result and sends a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result; and the central device is arranged to perform an encryption function on said first and second nonces to obtain a second result and to authenticate the peripheral device if said first and second results match.
 10. A method of authenticating a peripheral device in a wireless data exchange protocol, wherein the peripheral device: sends an advertising channel PDU comprising a first nonce; receives a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; and performs an encryption function using said first and second nonces to obtain a first result and sends a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result.
 11. A peripheral device for use with a wireless data exchange protocol and being arranged to: send an advertising channel PDU comprising a first nonce; receive a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; and perform an encryption function using said first and second nonces to obtain a first result; and to send a scan response scanning PDU back to the central device, said scan response scanning PDU comprising said first result.
 12. A method of authenticating a peripheral device in a wireless data exchange protocol, wherein a central device: receives an advertising channel PDU from the peripheral device, said advertising channel PDU comprising a first nonce; sends a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; receives a scan response scanning PDU from the peripheral device, said scan response scanning PDU comprising a first result being derived from an encryption function using said first and second nonces; performs an encryption function on said first and second nonces to obtain a second result; and authenticates the peripheral device if said first and second results match.
 13. A central device for use with a wireless data exchange protocol and being arranged to: receive an advertising channel PDU from the peripheral device, said advertising channel PDU comprising a first nonce; send a scan request scanning PDU to the peripheral device, said scan request scanning PDU comprising a second nonce; receive a scan response scanning PDU from the peripheral device, said scan response scanning PDU comprising a first result being derived from an encryption function using said first and second nonces; perform an encryption function on said first and second nonces to obtain a second result; and authenticate the peripheral device if said first and second results match.
 14. A cryptographic authentication of a peripheral device using a wireless search and discovery protocol. 